package com.hongyi.modelcontest.modular.contest.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 赛事信息表
 * </p>
 *
 * @author skyet
 * @since 2019-02-23
 */
public class ContestInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 赛事id
     */
    @TableId("contest_id")
    private String contestId;

    /**
     * 赛事名称
     */
    @NotBlank
    private String contestName;

    /**
     * 赛事描述
     */
    @NotBlank
    private String contestDesc;

    /**
     * 赛事开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @NotNull
    private Date registStartTime;

    /**
     * 赛事结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @NotNull
    private Date registEndTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

    /**
     * 创建时间
     */
    private LocalDateTime updatedTime;


    public String getContestId() {
        return contestId;
    }

    public void setContestId(String contestId) {
        this.contestId = contestId;
    }

    public String getContestName() {
        return contestName;
    }

    public void setContestName(String contestName) {
        this.contestName = contestName;
    }

    public String getContestDesc() {
        return contestDesc;
    }

    public void setContestDesc(String contestDesc) {
        this.contestDesc = contestDesc;
    }

    public Date getRegistStartTime() {
        return registStartTime;
    }

    public void setRegistStartTime(Date registStartTime) {
        this.registStartTime = registStartTime;
    }

    public Date getRegistEndTime() {
        return registEndTime;
    }

    public void setRegistEndTime(Date registEndTime) {
        this.registEndTime = registEndTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public LocalDateTime getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }

    @Override
    public String toString() {
        return "ContestInfo{" +
        "contestId=" + contestId +
        ", contestName=" + contestName +
        ", contestDesc=" + contestDesc +
        ", registStartTime=" + registStartTime +
        ", registEndTime=" + registEndTime +
        ", remark=" + remark +
        ", createdTime=" + createdTime +
        ", updatedTime=" + updatedTime +
        "}";
    }
}
